
<?php 
include('connexion.php');
$type=0;
if(isset($_SESSION['user_id'])){
    $id = $_SESSION['user_id'];
    $query = "SELECT user.utype_id FROM user join usertype ON user.utype_id=usertype.utype_id where user_id = $id;";                       
    $result = mysqli_query($connexion, $query); 
    $row = mysqli_fetch_array($result);
    $type = $row['utype_id'];
}

switch ($type) {
    case 4: include('menu_utype1.php');
        break;
    case 5: include('menu_utype1.php');
        break;
    default: include('menu_loggedoff.php');
    };

?>